#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N=100000+5;
int n;
int r[N];
int cnt[N];
int last[N];
int main(){
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    cin>>n;
    cout<<n;
    r[0]=0;
    for(int i=1;i<=n;i++){
        cin>>r[i];
        cnt[r[i]]++;
    }
    sort(r+1,r+n+1);
    int ans=0;
    for(int i=2;i<=n;i++){
        if(r[i]!=r[i-1]) last[r[i]]=r[i-1];
        int j=last[r[i]];
        while(!cnt[j]&&j>0){
            j=last[j];
        }
        if(j) cnt[j]--,ans++;
    }
    cout<<n-ans;
    return 0;
}
